package com.yyfax.ph.base;

import android.support.v4.content.ContextCompat;

import com.yyfax.ph.R;

public abstract class BaseYYFaxActivity extends BaseActivity {
	@Override
	public void pretreatmentAfterSetBaseView() {
	}

	@Override
	public void initContentView() {
	}

	public void setupTopBar(int title, boolean titleVisible, boolean secondTitleVisible, boolean backVisible, boolean rightVisible) {
		setTitle(title);
		setTitleVisible(titleVisible);
		setTitleLeftVisible(secondTitleVisible);
		setBtnBackVisible(backVisible);
		setBtnRightVisible(rightVisible);
	}

	public void setupTopBar(String title, boolean titleVisible, boolean secondTitleVisible, boolean backVisible, boolean rightVisible) {
		setTitle(title);
		setTitleVisible(titleVisible);
		setTitleLeftVisible(secondTitleVisible);
		setBtnBackVisible(backVisible);
		setBtnRightVisible(rightVisible);
	}

	@Override
	public int getTopBarBackgroundColor() {
		return ContextCompat.getColor(this, R.color.color_white);
	}

	@Override
	public void onBackBtnPressed() {
		super.onBackPressed();
		finish();
	}
}
